function [curvelet]=get_curvelet(identifier,varargin)
%function to call the partitition corresponding to the identifier
%e.g. cuvelet=get_curvelet('mycandes',[512,512],3,4)
%
%author: Sebastian Schmelcher version: 2012-06-20

%identifier recognision
if(iscell(identifier))
   identifier=identifier{1};
end



[id,subId]=strtok(identifier,'_');

switch id
    case 'candes'
        size=varargin{1};
        radial=varargin{2};
        angular=varargin{3};
        map=get_indexStruct(identifier,max(size));
        [~,curvelet]=curvelet_candes(size,(angular-1)*360/map(radial),radial,[1,1]);
        %imagesc(abs(curvelet));colormap('gray');
        %pause();
    case 'mycandes'
        size=varargin{1};
        radial=varargin{2};
        angular=varargin{3};
        curvelet=curvelet_mycandes(size,radial,angular);
        
    case 'mycandes_square'
        size=varargin{1};
        radial=varargin{2};
        angular=varargin{3};
        curvelet=curvelet_mycandes_square(size,radial,angular);

    
    case 'mycandes_sparse'
        size=varargin{1};
        radial=varargin{2};
        angular=varargin{3};
        curvelet=curvelet_mycandes_sparse(size,radial,angular);        
        
    case 'limitedAngle'
        size=varargin{1};
        radial=varargin{2};
        angular=varargin{3};
        [id,subId]=strtok(subId,'_');
        
        switch id
            case 'innerFading'
                lim_angl=str2double(strtok(subId,'_'));
                curvelet=curvelet_limitedAngle_innerFading(size,radial,angular,lim_angl);
            case 'outerFading'
                lim_angl=str2double(strtok(subId,'_'));
                curvelet=curvelet_limitedAngle_outerFading(size,radial,angular,lim_angl);
            case 'fixedFading'
                [pieces,subId]=strtok(subId,'_');
                [inner_angl,subId]=strtok(subId,'_');
                outer_angl=strtok(subId,'_');
                pieces=str2double(pieces);
                inner_angl=str2double(inner_angl);
                outer_angl=str2double(outer_angl);
                curvelet=curvelet_limitedAngle_fixedFading(size,radial,angular,pieces,inner_angl,outer_angl);
                
            otherwise
                curvelet={};
        end

        
    otherwise
        curvelet={};
end

